<?php

use Illuminate\Support\Facades\Lang;

if ($is_config):
    if ($this->previewMode):

?>

    <div class="form-control">
        <?= $value ?>
    </div>

<?php else: ?>

    <p class="help-block">
        <?= Lang::get('zders.customtools::lang.formwidgets.map_location.remind')?>
    </p>
    <input
        type="text"
        id="<?= $this->getId('input') ?>"
        name="<?= $name ?>"
        value="<?= $value ?>"
        class="form-control "
        readonly="true"
        autocomplete="off" />
   

<?php endif ?>

<div id='location-map-container'>

</div>
<div class="map-control form-group  widget-field span-left ">
	<div id="r-result">
	    <button type="button" onclick="originalposition()" class="btn btn-primary anchor " title="<?= Lang::get('zders.customtools::lang.formwidgets.map_location.button_title')?>" >
			<i class="icon-map-marker"></i>
		</button>
		<input type="text" id="suggestId" class="form-control" size="20" placeholder="<?= Lang::get('zders.customtools::lang.formwidgets.map_location.search_placeholder')?>" />
	</div>
	<div id="searchResultPanel"></div>
</div>
<?php else: ?>
    <div class="callout fade in callout-warning">
        <button
            type="button"
            class="close"
            data-dismiss="callout"
            aria-hidden="true">&times;</button>
        <div class="header">
            <i class="icon-warning"></i>
            <h3><?=Lang::get('zders.customtools::lang.formwidgets.map_location.notice_topic')?></h3>
        </div>
        <div class="content">
            <p><?=Lang::get('zders.customtools::lang.formwidgets.map_location.notice')?></p>
            <p><a href="/backend/system/settings/update/zders/customtools/config"><?=Lang::get('zders.customtools::lang.formwidgets.map_location.go_setting')?></a></p>
        </div>
    </div>
<?php endif ?>
